home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Telecom / Scripts / ARA SupraFaxModem Scripts / SupraFaxModem v.32 bis / SupraFaxModem v.32 bis next >
Text File  |  1992-04-08  |  3KB  |  175 lines

  1. ! "Supra SupraFaxModem v.32bis - 4/8/91"
  2. ! "Written by Steve Kruse "
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 57600, 0, 8, 1
  8. !
  9. ! first recall the factory configuration
  10. !
  11. matchclr
  12. settries 0
  13. matchstr 1 3 "OK\13\10"
  14. @LABEL 2
  15. write "AT&F1\13"
  16. matchread 30
  17. inctries
  18. iftries 2 59
  19. jump 2
  20. !
  21. ! Next, Set up the configuration: Echo off.
  22. !
  23. @LABEL 3
  24. matchstr 1 5 "OK\13\10"
  25. write "ATE0\13"
  26. matchread 30
  27. jump 59
  28. !
  29. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  30. !
  31. @LABEL 5
  32. matchclr
  33. ifstr 2 8 "1"
  34. matchstr 1 8 "OK\13\10"
  35. write "ATM0\13"
  36. matchread 30
  37. jump 59
  38. !
  39. ! The modem is ready.  So enable answering, or originate a call
  40. ! Mickey Mouse has big ears.
  41. ! Donald Duck has big feet.
  42. @LABEL 8
  43. ifANSWER 30
  44. note "Dialing ^1" 3
  45. write "ATDT^1\13"
  46. !
  47. @LABEL 9
  48. matchstr  1 11 "CONNECT 14400\13\10"
  49. matchstr  2 12 "CONNECT 57600\13\10"
  50. matchstr  3 13 "CONNECT 9600\13\10"
  51. matchstr  4 14 "CONNECT 2400\13\10"
  52. matchstr  5 50 "NO CARRIER\13\10"
  53. matchstr  6 50 "ERROR\13\10"
  54. matchstr  7 52 "NO DIALTONE\13\10"
  55. matchstr  8 53 "BUSY\13\10"
  56. matchstr  9 54 "NO ANSWER\13\10"
  57. matchread 700
  58. jump 59
  59. !
  60. @LABEL 11
  61. note "Communicating at 14400 bps." 2
  62. serreset 14400, 0, 8, 1
  63. jump 16
  64. !
  65. @LABEL 12
  66. note "Communicating at 57600 bps." 2
  67. serreset 57600, 0, 8, 1
  68. jump 16
  69. !
  70. @LABEL 13
  71. note "Communicating at 9600 bps." 2
  72. serreset 9600, 0, 8, 1
  73. jump 16
  74. !
  75. @LABEL 14
  76. note "Communicating at 2400 bps." 2
  77. serreset 2400, 0, 8, 1
  78. jump 16
  79. !
  80. @LABEL 16
  81. ifANSWER 17
  82. pause 30
  83. @LABEL 17
  84. exit 0
  85. !
  86. ! @ANSWER
  87. ! Set up the modem to answer
  88. @LABEL 30
  89. write "ATS0=1\13"
  90. matchstr 1 31 "OK\13\10"
  91. matchread 30
  92. jump 59
  93. !
  94. @LABEL 31
  95. matchstr 1  32 "RING\13\10"
  96. matchstr 2  11 "CONNECT 14400\13\10"
  97. matchstr 3  12 "CONNECT 57600\13\10"
  98. matchstr  4 13 "CONNECT 9600\13\10"
  99. matchstr  5 14 "CONNECT 2400\13\10"
  100. matchstr 6  50 "NO CARRIER\13\10"
  101. matchstr 7  50 "ERROR\13\10"
  102. matchstr 8  52 "NO DIALTONE\13\10"
  103. matchstr 9  53 "BUSY\13\10"
  104. matchstr 10  54 "NO ANSWER\13\10"
  105. matchread 700
  106. jump 31
  107. !
  108. @LABEL 32
  109. userhook 1
  110. note "Answering phone…" 2
  111. jump 31
  112. !
  113. ! 50: error messages
  114. !
  115. @LABEL 50
  116. exit -6021
  117. !
  118. @LABEL 52
  119. exit -6020
  120. !
  121. @LABEL 53
  122. exit -6022
  123. !
  124. @LABEL 54
  125. exit -6023
  126. !
  127. @LABEL 59
  128. exit -6019
  129. !
  130. ! Hang up the modem
  131. !
  132. @HANGUP
  133. @LABEL 60
  134. settries 0
  135. @LABEL 61
  136. write "ATH0\13"
  137. matchclr
  138. matchstr 1 64 "OK\13\10"
  139. matchstr 2 64 "NO CARRIER\13\10"
  140. matchstr 3 64 "ERROR\13\10"
  141. matchread 15
  142. inctries
  143. iftries 3 64
  144. ! no response, try escape sequence
  145. write "+++"
  146. matchclr
  147. matchstr 1 62 "OK\13\10"
  148. matchread 18
  149. !
  150. ! No response from modem, toggle DTR
  151. !
  152. DTRClear
  153. pause 10
  154. DTRSet
  155. jump 61
  156. !
  157. @LABEL 62
  158. matchclr
  159. matchstr 1 64 "OK\13\10"
  160. matchstr 2 64 "NO CARRIER\13\10"
  161. write "ATH0\13"
  162. matchread 50
  163. jump 61
  164. !
  165. ! Recall the factory settings for macintosh communications. & Leave Echo On.
  166. !
  167. @LABEL 64
  168. matchclr
  169. matchstr 1 65 "OK\13\10"
  170. write "AT&F1\13"
  171. matchread 30
  172. !
  173. @LABEL 65
  174. exit 0
  175.